/**
 * ANNCSR (2010-2011)
 */
package net.abbp.mtr;

import net.abbp.serial.SimpleSerial;

import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * 定时任务
 * 
 * @version 1.0 2010-12-26
 * @author lexloo(lexloo@gmail.com)
 * @since MTR 1.0
 */
public class DaqJob implements Job {
    private static final Logger logger = Logger.getLogger(DaqJob.class.getName());

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        SimpleSerial ss = Starter.SERIAL;

        if (ss != null) {
            if (ss.isOpen()) {
                if (logger.isInfoEnabled()) {
                    logger.info("请求数据");
                }

                Starter.SERIAL.writePortHexString("AA");
            }
        }
    }

}